<?php

    // mysql设置了编码格式为utf8；

    $dbms = "mysql";
    $host = "localhost";
    $dbName = "wxlnb";
    $user = "root";
    $paswd = "2048";
    $dsn = "$dbms:host=$host;dbname=$dbName";

    try {

        $pdotest = new PDO($dsn, $user, $paswd);
        
    }catch (PDOException $e) {
        die ("Error: ". iconv('gbk', 'utf-8',$e->getMessage())."<br/>");
    }

    

?>